﻿@using BonjourQuotation.UI.Models.SetupModel
@model SetupBanksGridViewModel
<div style="width: 881px; min-height: 300px; max-height: 442px; margin: auto; padding-top: 30px; padding-bottom: 30px; ">
    <table class="table table-bordered table-hover table-condensed" style="margin-bottom: -1px !important; width: 860px;background-color:white;">
        <thead>
            <tr>
                <th width="25%;" class="GridHeaders">Bank Code</th>
                <th width="30%;" class="GridHeaders">Bank</th>
                <th width="15%;" class="GridHeaders">City</th>
                <th width="10%;" class="GridHeaders">Active</th>
                <th width="10%;" class="GridHeaders">Delete</th>
                <th width="10%;" class="GridHeaders">Details</th>
            </tr>
        </thead>
    </table>
    <div style="height:350px; overflow-y:auto;">
        <table class="table table-bordered table-hover table-condensed" style="width: 860px; table-layout: fixed; background-color: white;">
            <tbody>
                @for (int ind = 0; ind < Model.Rows.Count; ind++)
                {
                    @Html.HiddenFor(model => model.Rows[ind].BankID)
                    <tr>
                        <td width="25%;" style="overflow-x: hidden">@Html.LabelForModel(Model.Rows[ind].BankCode, new { @class = "table_inputs_205", @style = "text-align: left" })</td>
                        <td width="30%;" style="overflow-x: hidden">@Html.LabelForModel(Model.Rows[ind].BankName, new { @class = "table_inputs_245", @style = "text-align: left" })</td>
                        <td width="15%;" style="overflow-x: hidden">@Html.LabelForModel(Model.Rows[ind].City, new { @class = "table_inputs_120", @style = "text-align: left" })</td>
                        <td width="10%;" style="overflow-x: hidden">@Html.LabelForModel(Model.Rows[ind].IsActive ? "Yes" : "No", new { @class = "table_inputs_76", @style = "text-align: left" })</td>
                        @if(Model.MenuSetupBankEdit)
                        { 
                            <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22 btn-danger" type="button" onclick="DeleteBank(@Model.Rows[ind].BankID)">Delete</button></td>
                        }
                        else
                        {
                            <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22 btn-danger" type="button" disabled="disabled" onclick="DeleteBank(@Model.Rows[ind].BankID)">Delete</button></td>
                        }
                        <td width="10%;" style="text-align:center"><button class="btn14 btn60 btnheight22" type="button" onclick="ShowBank('@Model.Rows[ind].BankID')">Details</button></td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
</div>
<button class="btn14 btn60" style="margin-right: 98px; margin-top: -5px; float:right;@(@Model.IsCanView?"":"display:none")" type="button" id="BankMoreBtn">More</button>
